package com.khshop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.khshop.pojo.Order;
import com.baomidou.mybatisplus.extension.service.IService;
import com.khshop.vo.ServiceResult;

/**
 * <p>
 * 订单 服务类
 * </p>
 *
 * @author zhaoyang
 * @since 2020-10-15
 */
public interface OrderService extends IService<Order> {

    //根据订单状态【待付款 待发货 待收货 待评价】查询订单信息
    public ServiceResult<IPage<Order>> searchOrderByStatus(Integer status, Integer page, Integer limit);

    //下单与微信支付接口对接
    public ServiceResult<Order> addOrder(Order order);

    //未支付订单处理
    public ServiceResult<Order> closeOrder(Long id);

    //取消订单处理
    public ServiceResult<Order> cancelOrder(Long id);

    //取消订单微信退款实现
    public ServiceResult<Order> cancelAndReturnOrder(Long id);

    //改变订单状态
    public ServiceResult<Order> changeOrderStatus(Long id, Integer status);
}
